package com.test.test01.config.rabbitmq;

/**
 * 定义rabbitMQ的常量  -> 自定义队列  交换机  routingKey
 */
public interface RabbitMQConstant {

    //=============================Direct=======================================

    /**
     * direct 交换机
     */
    String RABBIT_DIRECT_EXCHANGE="direct_exchange";


    /**
     * direct 队列
     */
    String RABBIT_DIRECT_QUEUEA="direct_queue_A";
    String RABBIT_DIRECT_QUEUEB="direct_queue_B";

    /**
     * direct routingKey
     */
    String RABBIT_DIRECT_ROUTING_KEY="direct_routing_key";


    //=============================Topic=======================================

    /**
     * topic 交换机
     */
    String RABBIT_TOPIC_EXCHANGE="topic_exchange";


    /**
     * topic 队列
     */
    String RABBIT_TOPIC_A_QUEUE="topic_queue.A";

    String RABBIT_TOPIC_B_QUEUE="topic_queue.B";

    /**
     * topic routingKey
     * 此模式下 只对routingKey操作
     *
     * RABBIT_TOPIC_ROUTING_A_KEY 发送只能是收到一条 因为RABBIT_TOPIC_ROUTING_A_KEY的值不匹配RABBIT_TOPIC_ROUTING_ALL_KEY的值
     * 但是RABBIT_TOPIC_ROUTING_ALL_KEY的值符合RABBIT_TOPIC_ROUTING_A_KEY的值,所以是两条
     *
     *
     * *代表只匹配一个  #代表匹配一个或者多个
     */
    String RABBIT_TOPIC_ROUTING_A_KEY="topic.#";

    String RABBIT_TOPIC_ROUTING_ALL_KEY="topic.A.V";

    //=============================Fanout=======================================

    /**
     * direct 交换机
     */
    String RABBIT_FANOUT_EXCHANGE="fanout_exchange";


    /**
     * direct 队列
     */
    String RABBIT_FANOUT_QUEUEA="fanout_queue_A";
    String RABBIT_FANOUT_QUEUEB="fanout_queue_B";
    String RABBIT_FANOUT_QUEUEC="fanout_queue_C";

    //=============================Delayed=======================================

    /**
     * 延时队列交换机
     */
    String RABBIT_DELAY_EXCHANGE = "x_delay_exchange";

    /**
     * 延时队列交换机类型
     */
    String RABBIT_DELAY_EXCHANGE_TYPE = "x-delayed-message";

    /**
     * 延时队列
     */
    String RABBIT_DELAY_EXPIRED_QUEUE = "expired_delay_queue";

    /**
     * 延时队列 routing key
     */
    String RABBIT_DELAY_EXPIRED_ROUTING_KEY = "expired_delay_key";

}
